
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { NzModalService } from 'ng-zorro-antd/modal';

import { ClaimAuditService } from '../../services/claim-audit.service';
import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component';
import { ParterClaimAuditListChannelRejectComponent } from '../channel-reject/channel-reject.component';

@Component({
  selector: 'app-parter-claim-audit-channel-detail',
  templateUrl: './channel-detail.component.html',
  styleUrls: ['./channel-detail.component.less']
})
export class ParterClaimAuditListChannelDetailComponent implements OnInit {
  id = this.route.snapshot.queryParams.id;
  i: any;
  imges: any;
  isVisible = false;
  columns: STColumn[] = [
    { title: '操作时间', index: 'id', width: 120 },
    { title: '操作人', type: 'img', width: 120, },
    { title: '操作人手机号', index: 'email', width: 120 },
    { title: '操作页面', index: 'phone' },
    { title: '操作内容', index: 'registered' }
  ];

  data=[{id:11111}]

  constructor(
    private route: ActivatedRoute,
    private service: ClaimAuditService,
    private modalService: NzModalService,
  ) {}

  ngOnInit(): void {
    this.initData();
  }

  initData() {
    // this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
    //   if (res) {
    //     this.i = res;
    //   
    //   }
    // });
  }

  approve() {
    const modalRef = this.modalService.create({
      nzTitle: '同意',
      nzWidth: 700,
      nzContent: ParterClaimAuditListChannelApproveComponent,
      nzComponentParams: {
        i: this.i
      },
      nzFooter: null
    });
  }
  reject() {
    const modalRef = this.modalService.create({
      nzTitle: '拒绝',
      nzWidth: 700,
      nzContent: ParterClaimAuditListChannelRejectComponent,
      nzComponentParams: {
        i: this.i
      },
      nzFooter: null
    });
  }
  goBack() {
    window.history.go(-1);
  }
  
}
